<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<noscript>
		
		<!-- <meta http-equiv="refresh" content="0;URL=/html5/newversion/member/uploadlicense.html?idType=10&DmiUg5zWxt=1H4YQPlOZnYi912RqwClEG">
		 --></noscript>
		<!--[if lt IE 9]><script r='m'>document.createElement("section")</script><![endif]-->

		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="yes" name="apple-touch-fullscreen">
		<meta content="telephone=no,email=no" name="format-detection">
		<meta content="fullscreen=yes,preventMove=no" name="ML-Config">
		<title>神州租车—中国租车领导者!天天超低价!!!</title>
		<meta name="description" content="神州租车-全国70大城市,90大机场高铁,万辆新车,不限里程,价格超低,手续便捷,服务尽心,24小时服务,携手贝克汉姆共启云战略.Tel:400-616-6666">
		<meta name="keywords" content="租车，租车网，租车公司，汽车租赁，H_lYMbU-rQ0RUInbjlkbxqyQBhQ">
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,minimal-ui">
		<meta name="apple-mobile-web-app-title" content="神州租车">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta content="telephone=no" name="format-detection">
		<meta name="baidu-tc-cerfication" content="55c603db1cd78c7f7ab7686162824f23">
		<link rel="stylesheet" type="text/css" href="/css/H5phone/身份证_files/zcbase@0ec0b016a8.css">
		<link rel="stylesheet" type="text/css" href="/css/H5phone/身份证_files/personalCenter@2aa330b0bd.css">
	</head>

	<body rlt="1" style="">
		<header class="zc_header_bd">
			<div class="getback" style="white-space:normal" data-url="/personInfos">
				<span class="getbackimg">&nbsp;</span>
			</div>
			<h1 class="header_title" id="page_title">证件上传</h1>
		</header>
		<div class="hotel-page-pt50 uploadL">
			<div class="uploadbox">
				<div class="tipbox tipno">
					<h5>&nbsp;</h5>
					<p>请按图示上传证件图片</p>
				</div>
				<div class="tipbox tipyes" style="display:none;">
					<h5>图片上传成功！</h5>
					<p>确认无误后请点击“提交”按钮</p>
				</div>
				<div class="tipbox tiping" style="display:none;">
					<h5>审核中</h5>
					<p>请耐心等待审核结果</p>
				</div>
				<input type="hidden" id="prosData" value="0">
				<input type="hidden" id="consData" value="0">
				<input type="hidden" id="firstValidDate" value="">
				<form id="" enctype="multipart/form-data">
					<input type="hidden" name="idType" id="idType" value="10">
					<div class="yelbox yelPros" data-num="0">
						<input onchange="pan()" id="articleFile" type="file" class="file-input" accept="image/*" name="articleFile">
						<img id="zheng" width="240px" height="168px" class="yelpic pic-id picselect" src="/image/H5phone/images/drpros.png">
						
						<div class="final"></div>
					</div>
					<div class="yelbox yelCons" data-num="1">
						<input onchange="pan()" id="articleFiles" type="file" class="file-input" accept="image/*" name="articleFiles">
						<img id="fu" width="240px" height="168px" class="yelpic pic-id picselect" src="/image/H5phone/images/drcons1.png">
						
						<div class="final"></div>
					</div>

					<p class="tbm">&nbsp;
						<a class="hand-op" href="javascript:;">&nbsp;</a>
					</p>
					<div class="btnbox">
						
						<input style="width: 100%;height: 45px;border: none;" class="btn-submit" type="button" value="提交">
						
					</div>
				</form>
			</div>
		</div>
		<div class="picmask">
			<div class="top">
				<span class="m-return">返回</span>
				<em class="m-delete" data-type="">删除</em>
			</div>
			<div class="mimg"></div>
		</div>
		<div class="pop-alertul yan" style="display: none;">
			<div class="oth-albox">
				<div class="altext pbig" id="pipei">
					<p>识别失败，身份证信息不匹配 </p>
				</div>
				<div class="twobtn">
					
					<a href="/personInfos" style="width: 270px" class="tb tb-rr">重新识别</a>
				</div>
			</div>
		</div>

		<div class="pop-alertul pop-yes" style="display: none;">
			<div class="oth-albox">
				<div class="altext pbig">
					<p>恭喜您，证件审核通过！</p>
				</div>
				<div class="twobtn">
				
					<a style="width: 270px;color: #fabe00" href="/personInfos" class="tb tb-ll btn-lyes">确定</a>
				</div>
			</div>
		</div>

		<div class="pop-alertul pop-no" style="display: none;">
			<div class="oth-albox">
				<div class="altext pbig">
					<p>很抱歉，证件审核未通过！<br>您可以先去做驾照认证</p>
				</div>
				<div class="twobtn">
					<a href="javascript:;" class="tb tb-ll btn-lno">取消</a>
					<a  href="javascript:;" class="tb tb-rr btn-rno">去认证驾照</a>
				</div>
			</div>
		</div>

		<div id="loading-mask" class="mask" style="display: none;">
			<div class="loading-new"><span class="l-logo"></span>
				<span class="l-film animate-loading"></span></div>
		</div>
<script type="text/javascript" src="/js/jquery-3.2.1.js"></script>



<script>




$(".btn-submit").attr("disabled",true);
var zheng ;
$("#articleFile").change(function(){
	 var $file = $(this);
	 var  fileObj = $file[0];
	var windowURL = window.URL || window.webkitURL;
	 var $img = $("#zheng");
    if(fileObj && fileObj.files && fileObj.files[0]){
    	zheng = windowURL.createObjectURL(fileObj.files[0]);
    $img.attr('src',zheng);
    }
   
})

$("#articleFiles").change(function(){
	 var $file = $(this);
     var fileObj = $file[0];
	var windowURL = window.URL || window.webkitURL;
	 var $img = $("#fu");
    if(fileObj && fileObj.files && fileObj.files[0]){
    dataURL = windowURL.createObjectURL(fileObj.files[0]);
    $img.attr('src',dataURL);
    }
})

function pan(){
	if($("#articleFile").val()!=""&&$("#articleFiles").val()!=""){
		$(".btn-submit").css("background-color","#FABE00");
		$(".btn-submit").removeAttr("disabled");
	}
}
$(".getback").click(function(){
	window.location.href=$(".getback").data("url");
})
/* $(window).on('beforeunload', () => { console.log('leave'); return false; }); */

$(".btn-submit").click(function(){
console.log($("#articleFile")[0].files[0])
	var formData=new FormData();
	formData.append("articleFile",$("#articleFile")[0].files[0]);
	formData.append("articleFiles",$("#articleFiles")[0].files[0]);
	$.ajax({
		type : "post",//请求类型
		url : "/users/H5jiaZhao",
		dataType : "json",//ajax接口（请求url）返回的数据类型
		data:formData,
		contentType:false,
		processData:false,
		cache:false,
		async:false,
		success : function(data) {//data：返回数据（json对象）
		if(data.msg=="success"){
		
			$("#loading-mask").show();
			setTimeout(function(){
				$("#loading-mask").hide();
				$(".pop-yes").css("display","block");
				
			},1500)
			
		}else if(data.msg=="1"){
			$("#loading-mask").show();
			setTimeout(function(){
				$("#loading-mask").hide();
				$("#pipei").html("您的驾照已过期，请上传正确");
				$(".yan").css("display","block");
			},1500)
		}else if(data.msg=="2"){
			$("#loading-mask").show();
			setTimeout(function(){
				$("#loading-mask").hide();
				$("#pipei").html("您的身份信息不统一，请重新上传");
				$(".yan").css("display","block");
			},1500)
		}else{
			$("#loading-mask").show();
			setTimeout(function(){
				$("#loading-mask").hide();
				$(".yan").css("display","block");
			},1500)
			
		}
		},
		error : function(data) {//当访问时候，404，500 等非200的错误状态码
		}

	});
	
	
	
})

</script>
	</body>

</html>